var Refresh = {};
Refresh.Web = {
	version: '4_0_0_beta1'
};

var FTB_MODE_DESIGN = 0;
var FTB_MODE_CODE = 1;

var FTB_BUTTONSTATE_DISABLED = 0;
var FTB_BUTTONSTATE_NORMAL = 1;
var FTB_BUTTONSTATE_HIGHLIGHT = 2;

var FTB_BREAKMODE_BR = 0;
var FTB_BREAKMODE_P = 1;
var FTB_BREAKMODE_DIV = 2;

var FTB_TABMODE_SPACES = 0;
var FTB_TABMODE_EXIT = 1;
var FTB_TABMODE_NONE = 2;

var FTB_EVENTCHAR_BOLD = 66;//b
var FTB_EVENTCHAR_ITALIC = 73; //i
var FTB_EVENTCHAR_UNDERLINE = 85; // u
var FTB_EVENTCHAR_UNDO = 90; //z
var FTB_EVENTCHAR_REDO = 89; //y
var FTB_EVENTCHAR_CUT = 88; //x
var FTB_EVENTCHAR_COPY = 67; //c
var FTB_EVENTCHAR_PASTE = 86; //v
var FTB_EVENTCHAR_PRINT = 80; //p

Refresh.defaultTheme = 'office12';
Refresh.path = '';

var scriptTags = document.getElementsByTagName("script");
for (var i=0;i<scriptTags.length;i++) {		
	if (scriptTags[i].src && scriptTags[i].src.match(/(Refresh|ftb(-debug)?)\.js(\?.*)?$/)) {
		Refresh.path = scriptTags[i].src.replace(/(Refresh|ftb(-debug)?)\.js(\?.*)?$/,'');		
		break;
	}
}
Refresh.windowPath = Refresh.path + 'popups/';

var scripts = ['Console','HTML', 'BrowserInfo', 'Utility', 'Windows', 'Localization', '../languages/en-US', 'CodeEditor', 'FreeTextBox', 'HtmlCleaner', 'Toolbar', 'EditorCommands' , 'ToolbarItemTypes', 'Namespace', 
'Floatie', 'pro-extras', 'pro-colorpicker', 'pro-form', 'pro-tables', 'pro-styles', 'pro-paste'
 ];

var head = document.getElementsByTagName('head')[0];
for (var i=0; i<scripts.length; i++) {
	document.write('<script type="text/javascript" src="'+Refresh.path + 'src/' + scripts[i] +'.js"></script>');
}